package com.huike.clues.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.huike.common.core.domain.BaseEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huike.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 线索
 * @TableName tb_clue
 */
@TableName(value ="tb_clue")
@Data
public class TbClue extends BaseEntity implements Serializable {

    /**
     * 线索id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 客户姓名
     */
    private String name;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 渠道
     */
    private String channel;

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 1 男 0 女
     */
    private String sex;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 微信
     */
    private String weixin;

    /**
     * qq
     */
    private String qq;

    /**
     * 意向等级
     */
    private String level;

    /**
     * 意向学科
     */
    private String subject;

    /**
     * 状态(已分配1  进行中2  回收3  伪线索4)
     */
    private String status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 创建人
     */
    private String createBy;


    /**
     * 伪线索失败次数(最大数3次)
     */
    private Integer falseCount;

    /**
     * 
     */
    private Date nextTime;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 是否转派
     */
    private String transfer;

    /**
     * 线索失效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("活动类型")
    private String activityInfo;

    /** 所属人 */
    @ApiModelProperty("所属人")
    @Excel(name = "所属人")
    private String owner;

    @ApiModelProperty("ownerTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ownerTime;

    /** 分配人 */
    @ApiModelProperty("分配人")
    @Excel(name = "分配人")
    private String assignBy;

    /** 活动名称 */
    @ApiModelProperty("活动名称")
    private String activityName;

    @ApiModelProperty("")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date assignTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public enum StatusType{


        UNFOLLOWED("待跟进","1"),
        FOLLOWING("跟进中","2"),
        RECOVERY("回收","3"),
        FALSE("伪线索/踢回公海","4"),
        DELETED("删除","5"),
        TOBUSINESS("转换商机","6"),
        TOCUSTOMER("转换客户","7");

        private String name;
        private String value;

        private StatusType(String name,String value)
        {
            this.name = name;
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public String getValue() {
            return value;
        }
    }
}